Field of the Invention
The present invention relates to an image processing method for improving an image quality of a shot image.
Description of the Related Art
In image pickup through an image pickup apparatus such as a camera, part of light incident on an image pickup optical system may be reflected by a surface of a lens and a member holding the lens and arrive at an imaging plane as unnecessary light. This unnecessary light appears as an unnecessary component such as a ghost and a flare in a shot image. When a diffractive optical element is used to correct longitudinal (axial) chromatic aberration and chromatic aberration of magnification, light from a high intensity object such as the sun outside an angle of view for the image shooting may be incident on the diffractive optical element, generating unnecessary light as an unnecessary component over the entire image.
Japanese Patent Laid-open No. 2008-54206 discloses a method of detecting any ghost based on a difference image indicating a difference between an image (in-focus image) when an image pickup optical system is in focus on an object and an image (defocus image) when the image pickup optical system is out of focus. However, the method disclosed in Japanese Patent Laid-open No. 2008-54206 requires image pickup to be performed a plurality of times and thus is not suitable for still image pickup and moving image pickup of a moving object.
Japanese Patent Laid-open No. 2011-205531 discloses a method of detecting any ghost based on comparison of a plurality of parallax images captured by a single-lens stereoscopic image pickup. The method disclosed in Japanese Patent Laid-open No. 2011-205531, which obtains a plurality of parallax images by single image pickup, is applicable to still image pickup and moving image pickup of a moving object.
However, the method disclosed in Japanese Patent Laid-open No. 2011-205531 detects any ghost by calculating a difference between a primary image and a secondary image, and thus has a degraded ghost detection effect when using parallax images captured at three viewpoints or more. On the other hand, Japanese Patent Laid-open No. 2011-205531 removes any ghost in each parallax image after a ghost detection, which leads to a complicated processing procedure.